3.9.54 \(\int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^3(c+d x) \, dx\) [854]

Optimal. Leaf size=84 \[ \frac {3 a \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a^3}{8 d (a-a \sin (c+d x))^2}-\frac {a^2}{2 d (a-a \sin (c+d x))}+\frac {a^2}{8 d (a+a \sin (c+d x))} \]

[Out]

3/8*a*arctanh(sin(d*x+c))/d+1/8*a^3/d/(a-a*sin(d*x+c))^2-1/2*a^2/d/(a-a*sin(d*x+c))+1/8*a^2/d/(a+a*sin(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2915, 12, 90, 212} \begin {gather*} \frac {a^3}{8 d (a-a \sin (c+d x))^2}-\frac {a^2}{2 d (a-a \sin (c+d x))}+\frac {a^2}{8 d (a \sin (c+d x)+a)}+\frac {3 a \tanh ^{-1}(\sin (c+d x))}{8 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^2*(a + a*Sin[c + d*x])*Tan[c + d*x]^3,x]

[Out]

(3*a*ArcTanh[Sin[c + d*x]])/(8*d) + a^3/(8*d*(a - a*Sin[c + d*x])^2) - a^2/(2*d*(a - a*Sin[c + d*x])) + a^2/(8
*d*(a + a*Sin[c + d*x]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 90

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2915

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d/b)*x
)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2,
 0]

Rubi steps

\begin {align*} \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^3(c+d x) \, dx &=\frac {a^5 \text {Subst}\left (\int \frac {x^3}{a^3 (a-x)^3 (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^2 \text {Subst}\left (\int \frac {x^3}{(a-x)^3 (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^2 \text {Subst}\left (\int \left (\frac {a}{4 (a-x)^3}-\frac {1}{2 (a-x)^2}-\frac {1}{8 (a+x)^2}+\frac {3}{8 \left (a^2-x^2\right )}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^3}{8 d (a-a \sin (c+d x))^2}-\frac {a^2}{2 d (a-a \sin (c+d x))}+\frac {a^2}{8 d (a+a \sin (c+d x))}+\frac {\left (3 a^2\right ) \text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,a \sin (c+d x)\right )}{8 d}\\ &=\frac {3 a \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a^3}{8 d (a-a \sin (c+d x))^2}-\frac {a^2}{2 d (a-a \sin (c+d x))}+\frac {a^2}{8 d (a+a \sin (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.16, size = 84, normalized size = 1.00 \begin {gather*} \frac {a \sec (c+d x) \tan ^3(c+d x)}{d}+\frac {a \tan ^4(c+d x)}{4 d}-\frac {a \left (6 \sec ^3(c+d x) \tan (c+d x)-3 \left (\tanh ^{-1}(\sin (c+d x))+\sec (c+d x) \tan (c+d x)\right )\right )}{8 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^2*(a + a*Sin[c + d*x])*Tan[c + d*x]^3,x]

[Out]

(a*Sec[c + d*x]*Tan[c + d*x]^3)/d + (a*Tan[c + d*x]^4)/(4*d) - (a*(6*Sec[c + d*x]^3*Tan[c + d*x] - 3*(ArcTanh[
Sin[c + d*x]] + Sec[c + d*x]*Tan[c + d*x])))/(8*d)

________________________________________________________________________________________

Maple [A]
time = 0.15, size = 98, normalized size = 1.17

method result size
derivativedivides \(\frac {\frac {a \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}+a \left (\frac {\sin ^{5}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{5}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) \(98\)
default \(\frac {\frac {a \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}+a \left (\frac {\sin ^{5}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{5}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) \(98\)
risch \(\frac {i \left (-2 i a \,{\mathrm e}^{4 i \left (d x +c \right )}-2 a \,{\mathrm e}^{3 i \left (d x +c \right )}+2 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+5 a \,{\mathrm e}^{5 i \left (d x +c \right )}+5 a \,{\mathrm e}^{i \left (d x +c \right )}\right )}{4 \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{4} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{2} d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}\) \(137\)
norman \(\frac {-\frac {3 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {2 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {11 a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {2 a \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {3 a \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {4 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) \(187\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^5*sin(d*x+c)^3*(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(1/4*a*sin(d*x+c)^4/cos(d*x+c)^4+a*(1/4*sin(d*x+c)^5/cos(d*x+c)^4-1/8*sin(d*x+c)^5/cos(d*x+c)^2-1/8*sin(d*
x+c)^3-3/8*sin(d*x+c)+3/8*ln(sec(d*x+c)+tan(d*x+c))))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 86, normalized size = 1.02 \begin {gather*} \frac {3 \, a \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, a \log \left (\sin \left (d x + c\right ) - 1\right ) + \frac {2 \, {\left (5 \, a \sin \left (d x + c\right )^{2} - a \sin \left (d x + c\right ) - 2 \, a\right )}}{\sin \left (d x + c\right )^{3} - \sin \left (d x + c\right )^{2} - \sin \left (d x + c\right ) + 1}}{16 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/16*(3*a*log(sin(d*x + c) + 1) - 3*a*log(sin(d*x + c) - 1) + 2*(5*a*sin(d*x + c)^2 - a*sin(d*x + c) - 2*a)/(s
in(d*x + c)^3 - sin(d*x + c)^2 - sin(d*x + c) + 1))/d

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 136, normalized size = 1.62 \begin {gather*} \frac {10 \, a \cos \left (d x + c\right )^{2} + 3 \, {\left (a \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) - a \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (a \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) - a \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, a \sin \left (d x + c\right ) - 6 \, a}{16 \, {\left (d \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) - d \cos \left (d x + c\right )^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/16*(10*a*cos(d*x + c)^2 + 3*(a*cos(d*x + c)^2*sin(d*x + c) - a*cos(d*x + c)^2)*log(sin(d*x + c) + 1) - 3*(a*
cos(d*x + c)^2*sin(d*x + c) - a*cos(d*x + c)^2)*log(-sin(d*x + c) + 1) + 2*a*sin(d*x + c) - 6*a)/(d*cos(d*x +
c)^2*sin(d*x + c) - d*cos(d*x + c)^2)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**5*sin(d*x+c)**3*(a+a*sin(d*x+c)),x)

[Out]

Exception raised: SystemError >> excessive stack use: stack is 3005 deep

________________________________________________________________________________________

Giac [A]
time = 0.56, size = 90, normalized size = 1.07 \begin {gather*} \frac {6 \, a \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - 6 \, a \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (3 \, a \sin \left (d x + c\right ) + a\right )}}{\sin \left (d x + c\right ) + 1} + \frac {9 \, a \sin \left (d x + c\right )^{2} - 2 \, a \sin \left (d x + c\right ) - 3 \, a}{{\left (\sin \left (d x + c\right ) - 1\right )}^{2}}}{32 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

1/32*(6*a*log(abs(sin(d*x + c) + 1)) - 6*a*log(abs(sin(d*x + c) - 1)) - 2*(3*a*sin(d*x + c) + a)/(sin(d*x + c)
 + 1) + (9*a*sin(d*x + c)^2 - 2*a*sin(d*x + c) - 3*a)/(sin(d*x + c) - 1)^2)/d

________________________________________________________________________________________

Mupad [B]
time = 14.46, size = 167, normalized size = 1.99 \begin {gather*} \frac {3\,a\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d}-\frac {-\frac {3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}+\frac {3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{2}+\frac {3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}-\frac {3\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((sin(c + d*x)^3*(a + a*sin(c + d*x)))/cos(c + d*x)^5,x)

[Out]

(3*a*atanh(tan(c/2 + (d*x)/2)))/(4*d) - ((3*a*tan(c/2 + (d*x)/2)^2)/2 - (3*a*tan(c/2 + (d*x)/2))/4 + (a*tan(c/
2 + (d*x)/2)^3)/2 + (3*a*tan(c/2 + (d*x)/2)^4)/2 - (3*a*tan(c/2 + (d*x)/2)^5)/4)/(d*(2*tan(c/2 + (d*x)/2) + ta
n(c/2 + (d*x)/2)^2 - 4*tan(c/2 + (d*x)/2)^3 + tan(c/2 + (d*x)/2)^4 + 2*tan(c/2 + (d*x)/2)^5 - tan(c/2 + (d*x)/
2)^6 - 1))

________________________________________________________________________________________